//OrderDecorator.java
package decorator.printinvoice;

import java.util.Date;

/**
 * order invoice's decorator.
 * such as header and footer
 *@author:youtubezou
 *@version:2012-7-25
 */
public abstract class OrderDecorator implements Order{
	protected Order order;
	
	public OrderDecorator(Order order){
		this.order = order;
	}
	
	public void print(){
		order.print();
	}
	
	public void add(OrderLine item){
		order.add(item);
	}
	
	public void remove(OrderLine item){
		order.remove(item);
	}
		
	public double getGrandTotal(){
		return order.getGrandTotal();
	}
	
	public String getCustomerName(){
		return order.getCustomerName();
	}
	
	public void setCustomerName(String customerName){
		order.setCustomerName(customerName);
	}
	
	public Date getSalesDate() {
		return order.getSalesDate();
	}

	public void setSalesDate(Date salesDate) {
		order.setSalesDate(salesDate);
	}
	
}
